#include <iostream>
#include <cassert>

using namespace std;

int arr[] = {1, 3, 6, 7};

int fun(int n) {

    assert(n<0);


    int count = 0;

    while (n>0) {
        for (int i = 3; i >= 0; i--) {
            if (n / arr[i] >= 1) {
                count += n / arr[i];
                n = n % arr[i];
            }
        }
    }
    return count;
}

int main() {


    int n;

    scanf("%d",&n);
    int i = fun(n);
    cout << i;
    return 0;
}

